<!-- 核心团队模型 -->
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
String mid=request.getParameter("mid");
String lng=request.getParameter("lng");
%>
<script type="text/javascript" src="<%=path %>/js/management.js"></script>
<script type="text/javascript" src="<%=path %>/resources/jquery/jquery.form.js"></script>
<script type="text/javascript" src="<%=path %>/resources/jquery/ajaxfileupload.js"></script>
<script type="text/javascript" src="<%=path %>/js/hexintuandui.js"></script>
<script type="text/javascript">
var mid = '<%=mid%>';
var lng = '<%=lng%>';
var path='<%=path%>';
$(document).ready(function() {
	
	$.ajax({
		type : "post",
		url : "neirongAction.do",
		dataType : "json",
		data : {
			"menuVO.mid":mid,
			"menuVO.lng":lng
		},
		success : function(data) {
			var documentList = data.documentVOList;
			var  patern = '';
			//遍历数据
			var j = -1;
			for (var i = 0; i < documentList.length; i++) {
				patern+=('<div class= "total" style = "width:95%;height:200px;border:2px solid green;"value = "'+documentList[i].daid+'">');
				patern+=('<div class="picture" style = "border:1px solid green;width:50%;height:195px;float:left" ><label>图片<img alt="" src="'+path+documentList[i].imgurl+documentList[i].imgfilename+'"alt="" width="450" height="180"></div>');	
				patern+=('<div class="title" style = "margin-top:60pt;width:49%;height:25px;float:right"><label>标题：<input type = "text" style="width:400px" value ="'+documentList[i].title+'"></input></div>');
				patern+=('<input style = "float:right;margin-top:50pt" type="button" class="del" value="删除"/>');
				patern+=('</div><br>');
			} 
			
			$(".hexintuandui").append(patern);
			
			$("#add").click(function(){
				j++;  
				$(".hexintuandui").append('<div  class= "total" style = "width:95%;height:200px;border:2px solid green;">'
				                         +'<div class="picture" style = "border:1px solid green;width:50%;height:195px;float:left">'
				                         +'<label>图片<input style = "margin-top:60pt" type="file" class="fileList" name="fileVOList['+j+'].fileVO"></div>'
				                         +'<div class="title" style = "margin-top:60pt;width:49%;height:25px;float:right;">'
				                         +'<label>标题：<input type = "text" style="width:400px" value =""  name="fileVOList['+j+'].documentVO.title"></input></div>'
				                  		 +'<input style = "float:right;margin-top:50pt" type="button" class="del" value="删除"/>'
										 +'</div><br>');
				$(".del").click(function(){
					$(this).parent().hide() ;
				});
			});
			
			$(".del").click(function(){
				
				$(this).parent().hide() ;
			});
		}
	});

});

</script>
<form action="savehxtdAction.do" method="post" enctype="multipart/form-data" id="form">
<a href="javascript:void(0)" id="add" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a> 
<a href="javascript:void(0)" id="savehxtd" class="easyui-linkbutton" iconCls="icon-save" plain="true">保存</a>
	<input type="text" name="menuVo.mid" value='<%=mid%>' style="visibility:hidden">
	
	<input type="text" name="menuVo.lng" value='<%=lng%>' style="visibility:hidden">
	
	<div class="deltupian" id="deltupian"></div>
	
	<div class="hexintuandui" align="center"></div>
</form>